﻿using UtilZ.Dotnet.Ex.Communication.Base;
using UtilZ.Dotnet.Ex.Model;

namespace UtilZ.Dotnet.Ex.Communication.Net.BMQ
{
    /// <summary>
    /// 
    /// </summary>
    public class BMQDataOutputArgs : DataOutputArgs
    {
        private readonly ArraySpan<byte> _data = new ArraySpan<byte>();
        /// <summary>
        /// 数据2
        /// </summary>
        public ArraySpan<byte> Data2
        {
            get { return this._data; }
        }


        /// <summary>
        /// 
        /// </summary>
        public BMQDataOutputArgs()
        {

        }


        /// <summary>
        /// 更新数据
        /// </summary>
        /// <param name="linkInfo">连接信息</param>
        /// <param name="buffer">数据</param>
        /// <param name="offset">数据起始索引</param>
        /// <param name="length">数据长度</param>
        public void Update(LinkInfoAbs linkInfo, byte[] buffer, int offset, int length)
        {
            base.Update(linkInfo, null);
            this._data.Update(buffer, offset, length);
        }

    }
}
